import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      //布局页
      path: "/",
      name: "layer",
      component: () => import("@/components/layer"),
      //   redirect: "importSheet",
      children: [
        {
          //工作簿
          path: "/importSheet",
          name: "importSheet",
          component: () => import("@/pages/sheet/importExSheet.vue")
        },
        // {
        //   //单元格
        //   path: "/cell",
        //   name: "cell",
        //   component: () => import("@/pages/cell/cell.vue")
        // },
        {
          //导入/导出excel
          path: "/importAndExportExcel",
          name: "importAndExportExcel",
          component: () => import("@/pages/sheet/importAndExportExcel")
        },
        {
          //JSON导入/导出
          path: "/importAndExportJson",
          name: "importAndExportJson",
          component: () => import("@/pages/sheet/importAndExportJson")
        },
        {
          //sheet新增/删除
          path: "/addAndDelSheet",
          name: "addAndDelSheet",
          component: () => import("@/pages/sheet/addAndDelSheet")
        },
        {
          //sheet修改名称
          path: "/editSheetName",
          name: "editSheetName",
          component: () => import("@/pages/sheet/editSheetName")
        },
        {
          //锁定sheet
          path: "/lockSheet",
          name: "lockSheet",
          component: () => import("@/pages/sheet/lockSheet")
        },
        {
          //sheet状态
          path: "/sheetState",
          name: "sheetState",
          component: () => import("@/pages/sheet/sheetState")
        },
        {
          //初始化指定行/列数
          path: "/initRowAndCol",
          name: "initRowAndCol",
          component: () => import("@/pages/sheet/initRowAndCol")
        },
        {
          //初始化滚动条位置
          path: "/scroll",
          name: "scroll",
          component: () => import("@/pages/sheet/scroll")
        },
        {
          //插入行/列数
          path: "/insertRowAndCol",
          name: "insertRowAndCol",
          component: () => import("@/pages/sheet/insertRowAndCol")
        },
        {
          //删除行/列数
          path: "/delRowAndCol",
          name: "delRowAndCol",
          component: () => import("@/pages/sheet/delRowAndCol")
        },
        //fy-start
        {
          //隐藏行
          path: "/hideRow",
          name: "hideRow",
          component: () => import("@/pages/sheet/hideRow")
        },
        {
          //隐藏列
          path: "/hideColumn",
          name: "hideColumn",
          component: () => import("@/pages/sheet/hideColumn")
        },
        {
          //显示行
          path: "/showRow",
          name: "showRow",
          component: () => import("@/pages/sheet/showRow")
        },
        {
          //显示列
          path: "/showColumn",
          name: "showColumn",
          component: () => import("@/pages/sheet/showColumn")
        },
        {
          //冻结行
          path: "/setHorizontalFrozen",
          name: "setHorizontalFrozen",
          component: () => import("@/pages/sheet/setHorizontalFrozen")
        },
        {
          //冻结列
          path: "/setVerticalFrozen",
          name: "setVerticalFrozen",
          component: () => import("@/pages/sheet/setVerticalFrozen")
        },
        {
          //设置行高
          path: "/setRowHeight",
          name: "setRowHeight",
          component: () => import("@/pages/sheet/setRowHeight")
        },
        {
          //设置列宽
          path: "/setColumnWidth",
          name: "setColumnWidth",
          component: () => import("@/pages/sheet/setColumnWidth")
        },
        {
          //单元格类型
          path: "/setCellFormatCt",
          name: "setCellFormatCt",
          component: () => import("@/pages/cell/setCellFormatCt")
        },
        {
          //显示文本
          path: "/showCellText",
          name: "showCellText",
          component: () => import("@/pages/cell/showCellText")
        },
        {
          //原始值
          path: "/originValue",
          name: "originValue",
          component: () => import("@/pages/cell/originValue")
        },
        {
          //单元格隐藏属性
          path: "/hideTag",
          name: "hideTag",
          component: () => import("@/pages/cell/hideTag")
        },
        {
          //单元格字体
          path: "/setCellFormatFf",
          name: "setCellFormatFf",
          component: () => import("@/pages/cell/setCellFormatFf")
        },
        {
          //单元格字体
          path: "/setCellFormatFf",
          name: "setCellFormatFf",
          component: () => import("@/pages/cell/setCellFormatFf")
        },
        {
          //单元格颜色
          path: "/setCellFormatBg",
          name: "setCellFormatBg",
          component: () => import("@/pages/cell/setCellFormatBg")
        },
        {
          //单元格对齐方式
          path: "/setCellFormatAlign",
          name: "setCellFormatAlign",
          component: () => import("@/pages/cell/setCellFormatAlign")
        },
        {
          //合并单元格
          path: "/mergeCell",
          name: "mergeCell",
          component: () => import("@/pages/cell/mergeCell")
        },
        {
          //单元格公式
          path: "/cellFunc",
          name: "cellFunc",
          component: () => import("@/pages/cell/cellFunc")
        },
        {
          //单元格批注
          path: "/setCellFormatPs",
          name: "setCellFormatPs",
          component: () => import("@/pages/cell/setCellFormatPs")
        },
        {
          //自定义公式
          path: "/cellDefinedFunc",
          name: "cellDefinedFunc",
          component: () => import("@/pages/cell/cellDefinedFunc")
        },
        {
          //设置/清除/删除单元格值
          path: "/setClearAndDelCellValue",
          name: "setClearAndDelCellValue",
          component: () => import("@/pages/cell/setClearAndDelCellValue")
        },
        {
          //设置单元格格式
          path: "/setCellFormat",
          name: "setCellFormat",
          component: () => import("@/pages/cell/setCellFormat")
        },
        {
          //查找单元格
          path: "/find",
          name: "find",
          component: () => import("@/pages/cell/find")
        },
        {
          //替换单元格内容
          path: "/replace",
          name: "replace",
          component: () => import("@/pages/cell/replace")
        },
        {
          //锁定单元格
          path: "/lockCell",
          name: "lockCell",
          component: () => import("@/pages/cell/lockCell")
        },
        {
          //事件-鼠标点击
          path: "/cellMousedown",
          name: "cellMousedown",
          component: () => import("@/pages/event/cellMousedown")
        },
        //fy-end
        {
          //事件-鼠标点击
          path: "/dbClickCell",
          name: "dbClickCell",
          component: () => import("@/pages/event/dbClickCell")
        },
        {
          //事件-自定义单元格右键菜单
          path: "/defRightMenu",
          name: "defRightMenu",
          component: () => import("@/pages/event/defRightMenu")
        }
      ]
    }
  ]
});
